using System;

namespace EssentialTools.Models
{
    public class MinimumDiscountHelper:IDiscountHelper
    {
        public decimal ApplyDiscount(decimal total)
        {
            if (total<0m)
            {
                throw new ArgumentOutOfRangeException();
            }
            else if (total<10m)
            {
                return total;
            }else if(total<100m)
            {
                return total - 5m;
            }
            return 0.9m * total;
        }
    }
}